{extend name="web/public/base" /}
{block name="header"}
{/block}
{block name="main"}
<section class="scrollable padder">
    <ul class="breadcrumb no-border no-radius b-b b-light pull-in">
        <li><a><i class="fa fa-home"></i> 首页</a></li>
        <li class="active">财务中心</li>
        <li class="active">{$title}</li>
    </ul>
    <div class="row">
        <div class="col-sm-12">
            <section class="panel panel-default">
                <header class="panel-heading font-bold">{$title}</header>
                <div class="panel-body">
                    <form id="vform" role="form" method="post">
                        <div class="row col-lg-12">
                            <div class="form-group col-sm-6">
                                <label>会员账号 :&nbsp;</label>
                                <span>{$wdinfo.usernumber}</span>
                            </div>
                            <div class="form-group col-sm-6">
                                <label>用户姓名 :&nbsp;</label>
                                <span>{$wdinfo.userid|getInfo='realname',###}</span>
                            </div>
                        </div>
                        <div class="row col-lg-12">
                            <div class="form-group col-sm-6">
                                <label>币种 :&nbsp;</label>
                                <span>{$wdinfo.moneytype|getMoneyType}</span>
                            </div>
                            <div class="form-group col-sm-6">
                                <label>提现金额 :&nbsp;</label>
                                <span>{$wdinfo['money']+$wdinfo['fee']+$wdinfo['game']+$wdinfo['shop']|format_num}</span>
                            </div>
                            <div class="form-group col-sm-6">
                                <label>实得金额 :&nbsp;</label>
                                <span>{$wdinfo.money|format_num}</span>
                            </div>
                        </div>
                        <div class="row col-lg-12">
                            <div class="form-group col-sm-6">
                                <label>支付宝收款码 :&nbsp;</label>
                                <span><img src="{$wdinfo.alipay|get_cover='path'}" alt="" style="width:100px;"></span>
                            </div>
                            <div class="form-group col-sm-6">
                                <label>微信收款码 :&nbsp;</label>
                                <span><img src="{$wdinfo.wechat|get_cover='path'}" alt="" style="width:100px;"></span>
                            </div>
                        </div>
                        <div class="row col-lg-12">
                            <div class="form-group col-sm-6">
                                <label>开户行 :&nbsp;</label>
                                <span>{$wdinfo.bankname|default='无'}</span>
                            </div>
                            <div class="form-group col-sm-6">
                                <label>银行卡号 :&nbsp;</label>
                                <span>{$wdinfo.banknumber|default='无'}</span>
                            </div>
                        </div>

                        {if condition="$wdinfo['status'] eq 0"}
                        <footer class="panel-footer text-right bg-light lter col-sm-12">
                            <button type="button" class="btn btn-success" onclick="agree({$id});">通过</button>
                            <button type="button" class="btn btn-info" onclick="refuse({$id});">拒绝</button>
                        </footer>
                        {/if}
                    </form>
                </div>
            </section>
        </div>
    </div>
</section>
{/block}
{block name="footer"}
<script type="text/javascript">
    function agree(id) {
        layer.confirm('确定同意该会员的提现申请吗？', function () {
            var index = layer.load('正在跳转，请耐心等待');
            $.post("{:url('agree')}", {type: 2, id: id}, function (data) {
                layer.close(index);
                layer.msg(data.msg);
                location.reload();
            }, "json");
            return false;
        })
    }
    function refuse(id) {
        layer.confirm('确定同意该会员的提现申请吗？', function () {
            var index = layer.load('正在跳转，请耐心等待');
            $.post("{:url('refuse')}", {type: 2, id: id}, function (data) {
                layer.close(index);
                layer.msg(data.msg);
                location.reload();
            }, "json");
            return false;
        })
    }
</script>
{/block}
